/*******************************************************************************
  * Copyright(c) 2023 Levetop Semiconductor Co.,Led. All rights reserved.
  * @file     varCounter.h
  * @author   UartTFT Application Team
  * @version  V0.0.1
  * @date     2023-01-04
  * @brief    This file contains the functions prototypes for the UartTFT
  *           Application display firmware.
 ********************************************************************************/

#ifndef VARCOUNTER_H_
#define VARCOUNTER_H_
#include "type.h"
#include "module_select.h"

typedef struct
{
	uint16_t v_add;
	uint16_t c_add;
	uint8_t v_type;
	uint16_t V_loop;
	uint16_t V_once;
	uint16_t V_stop;
	long long Vmin;
	long long Vmax;
	uint16_t step;
	uint16_t t_d;		// Frame time interval
	uint16_t t_c;		// Record time
	uint8_t mode;
	uint8_t feedback;
	uint16_t var_addr[8];
	uint16_t var[8];
} Var_Count_Info;
//extern Var_Count_Info gVar_Count_Info[];

extern Var_Count_Info gVar_Count_Info[VAR_COUNT_SIZE];
extern uint8_t Var_Count_num;
extern uint8_t Var_Count_flag;

extern void Check_Var_Count(void);
extern void Variable_Count(uint8_t type, uint8_t *buff);
extern void Run_Var_Count(uint8_t num);

#endif /* VARCOUNTER_H_ */
